<template>
  <!-- 首页轮播图组件 -->
  <van-swipe :autoplay="2000" indicator-color="#ff5733" class="banner">
    <van-swipe-item v-for="img in bannerImgs" :key="img">
      <img :src="img" />
    </van-swipe-item>
  </van-swipe>
</template>

<script>
export default {
  data() {
    return {
      //首页轮播图
      bannerImgs: [
        "../../../static/img/01.png",
        "../../../static/img/02.png",
        "../../../static/img/03.png",
        "../../../static/img/04.png"
      ]
    };
  }
};
</script>
<style scoped >
.banner {
  width: 100%;
  margin-bottom: 0.45rem;
  margin-top: 0.45rem;
}

.van-swipe__indicators > .van-swipe__indicator {
  background-color: #000;
  opacity: 1;
}
.van-swipe__track img {
  width: 100%;
}
</style>

